package com.hades.common.extend

import android.view.View
import org.hades.library.adapter.base.BaseBinderAdapter


fun BaseBinderAdapter.addItemType(block: BaseBinderAdapter.() -> Unit): BaseBinderAdapter {
    block()
    return this
}

fun BaseBinderAdapter.onBindEvent(block: BaseBinderAdapter.(baseAdapter: BaseBinderAdapter, view: View, position: Int) -> Unit): BaseBinderAdapter {
    setOnItemChildClickListener { adapter, view, position ->
        run {
            block(adapter as BaseBinderAdapter, view, position)
        }
    }

    return this
}

class AdapterExt {
}